this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.Ui=this.BX.Landing.Ui||{};this.BX.Landing.Ui.Panel=this.BX.Landing.Ui.Panel||{};this.BX.Landing.Ui.Panel.Formsettingspanel=this.BX.Landing.Ui.Panel.Formsettingspanel||{};(function(e,t,n,r,i,a,s,o){"use strict";var l="/bitrix/js/landing/ui/panel/formsettingspanel/content/analytics/dist/images/yandex.svg";var c="/bitrix/js/landing/ui/panel/formsettingspanel/content/analytics/dist/images/google.svg";var p;function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){babelHelpers.defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,e);this.options=g({},t)}babelHelpers.createClass(e,[{key:"render",value:function e(){return o.Tag.render(p||(p=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="landing-ui-content-table-cell">\n\t\t\t\t',"\n\t\t\t</div>\n\t\t"])),o.Text.encode(this.options.content))}}]);return e}();var b;function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){babelHelpers.defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(){function e(t){babelHelpers.classCallCheck(this,e);this.options=L({},t)}babelHelpers.createClass(e,[{key:"render",value:function e(){var t=this.options.head?" landing-ui-content-table-row-head":"";return o.Tag.render(b||(b=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="landing-ui-content-table-row','">\n\t\t\t\t',"\n\t\t\t</div>\n\t\t"])),t,this.options.columns.map((function(e){return e.render()})))}}]);return e}();var T,h;function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){babelHelpers.defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(){function e(t){babelHelpers.classCallCheck(this,e);this.options=I({},t);this.headRow=new O({columns:this.options.columns.map((function(e){return new d(e)})),head:true});this.rows=this.options.rows.map((function(e){return new O({columns:e.columns.map((function(e){return new d(e)}))})}))}babelHelpers.createClass(e,[{key:"getTitleLayout",value:function e(){if(Type.isStringFilled(this.options.title)){return o.Tag.render(T||(T=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-content-table-title">',"</div>\n\t\t\t"])),this.options.title)}return""}},{key:"render",value:function e(){return o.Tag.render(h||(h=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="landing-ui-content-table-wrapper">\n\t\t\t\t\n\t\t\t\t<div class="landing-ui-content-table">\n\t\t\t\t\t',"\n\t\t\t\t\t","\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t"])),this.headRow.render(),this.rows.map((function(e){return e.render()})))}}]);return e}();var N=function(e){babelHelpers.inherits(r,e);function r(e){var s;babelHelpers.classCallCheck(this,r);s=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(r).call(this,e));s.setEventNamespace("BX.Landing.UI.Panel.FormSettingsPanel.AgreementsContent");var o=new n.HeaderCard({title:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_TITLE")});var p=[];if(t.Loc.getMessage("LANGUAGE_ID")==="ru"){p.push({id:"yandex",title:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_ITEM_YANDEX_METRIKA"),icon:l,checked:true,switcher:false,content:s.getYandexTable()})}p.push({id:"google",title:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_ITEM_GOOGLE_ANALYTICS"),icon:c,checked:true,switcher:false,content:s.getGoogleTable()});var u=new i.AccordionField({selector:"analytics",title:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_ITEMS_FIELD_TITLE"),items:p});var g=new a.MessageCard({id:"analyticsMessage",header:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_MESSAGE_TITLE"),description:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_MESSAGE_DESCRIPTION"),angle:false,restoreState:true});s.addItem(o);s.addItem(g);s.addItem(u);return s}babelHelpers.createClass(r,[{key:"getYandexTable",value:function e(){var n=new y({columns:[{id:"title",content:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_TABLE_NAME_COLUMN_TITLE")},{id:"id",content:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_TABLE_ID_COLUMN_TITLE")}],rows:this.options.formOptions.analytics.steps.map((function(e){return{columns:[{content:e.name},{content:e.event}]}}))});return n.render()}},{key:"getGoogleTable",value:function e(){var n=new y({columns:[{id:"title",content:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_TABLE_NAME_COLUMN_TITLE")},{id:"id",content:t.Loc.getMessage("LANDING_FORM_SETTINGS_ANALYTICS_TABLE_ID_COLUMN_TITLE")}],rows:this.options.formOptions.analytics.steps.map((function(e){return{columns:[{content:e.name},{content:e.code}]}}))});return n.render()}}]);return r}(r.ContentWrapper);e.default=N})(this.BX.Landing.Ui.Panel.Formsettingspanel.Content=this.BX.Landing.Ui.Panel.Formsettingspanel.Content||{},BX.Landing,BX.Landing.UI.Card,BX.Landing.UI.Panel,BX.Landing.UI.Field,BX.Landing.UI.Card,BX,BX);
//# sourceMappingURL=analytics.bundle.map.js